<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="bean.Television" %>

<%
    List<Television> televisions = (List<Television>) request.getAttribute("televisions");
    if (televisions != null) {
        for (Television tv : televisions) {
%>
<div class="product" data-category="<%= tv.getSubCategory() != null ? tv.getSubCategory().getName() : "" %>">
    <img src="/221210400201/static/img/电视机/<%= tv.getImageUrl() %>" alt="<%= tv.getName() %>">
    <h3><%= tv.getName() %></h3>
    <p class="price">￥<%= tv.getPrice() %></p>
    <p>屏幕尺寸：<%= tv.getScreenSize() %></p>
    <p>分辨率：<%= tv.getResolution() %></p>
</div>
<%
        }
    }
%> 